package com.wy.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 作者：王昭贵
 * 日期：2023/1/5
 */
@Data
public class User implements Serializable {
    @TableId(value = "id", type = IdType.AUTO)
    private int id;
    //用户名
    private String username;
    //用户密码
    private String password;
    //用户昵称
    private String nickname;
    //手机号
    private String phone;
    //性别
    @TableField(value = "sex")
    private String sex;
    //头像
    private String image;
    //角色
    private String role;
    //状态
    private int status;

    private String description;

    private Integer deleteStatus;
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createTime;


    @TableField(fill = FieldFill.INSERT_UPDATE)
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updateTime;
}
